package com.sense.feel.login.model.bean;

import java.io.Serializable;
import java.util.Comparator;

public class AreaBean implements Serializable {
    /*  {
    "code": 93,
    "tw": "阿富汗",
    "en": "Afghanistan",
    "locale": "AF",
    "zh": "阿富汗",
    "py": "A"
  },*/
    public String tw;         //台语
    public String en;      //英文
    public String zh;   //简体中文
    public int code;         //地区代码
    public String locale;       //地区时区
    public String py;       //地区名首字母


    /**
     * 按拼音进行排序
     */
    public static class ComparatorPY implements Comparator<AreaBean> {
        @Override
        public int compare(AreaBean lhs, AreaBean rhs) {
            String str1 = lhs.tw;
            String str2 = rhs.tw;
            return str1.compareToIgnoreCase(str2);
        }
    }
}
